package com.huike.game.dao;

import android.content.Context;

import com.huike.game.DbHelper.DataHelper;
import com.huike.game.base.Bean20;
import com.j256.ormlite.dao.Dao;

import java.sql.SQLException;
import java.util.List;

public class Game20Dao {
    private  DataHelper helper;
    private Dao dao;

    public Game20Dao(Context context) throws SQLException {
        helper   = DataHelper.getInstance(context);
        dao = helper.getDao(Bean20.class);
    }


    public void save(Bean20 bean) throws SQLException {
        dao.create(bean);
    }

    public List<Bean20> allList() throws SQLException {
        List list = dao.queryForAll();
        return list;

    }

}
